package com.todo.strategy.offline.application.remote;

import com.todo.common.common.entity.response.BizResponse;
import com.todo.strategy.pipeline.service.api.request.OfflineToOnlineRequest;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author azhebuxing
 * @date 2025/3/1 23:24
 * @description
 */
@FeignClient(name = "todoSightPipelineService", url = "http://localhost:18005")
public interface StrategyPipelineRemoteService {

    /************TODO 实现一个中间层service，用于直接在保存失败情况下的数据存储记录，无需上层控制***************/
    /************失败情况下的数据保存重试机制，当前暂未实现***************/


    @Operation(summary = "离线到线上数据同步")
    @PostMapping("/api/pipeline/execute/offlineToOnline")
    BizResponse<Boolean> offlineToOnline(OfflineToOnlineRequest request);

    @Operation(summary = "离线到线上数据同步异步")
    @PostMapping("/api/pipeline/execute/offlineToOnlineAsync")
    BizResponse<Boolean> offlineToOnlineAsync(OfflineToOnlineRequest request);
}
